package com.crack.nga2.span;

import android.graphics.Bitmap;

import com.android.volley.toolbox.ImageLoader;

/**
 * Volley框架使用的缓存类
 * Created by Administrator on 2016/1/11.
 */
public class VolleyBitmapCache implements ImageLoader.ImageCache {
    private BitmapCache bitmapCache;

    public VolleyBitmapCache(){
        bitmapCache = BitmapCache.getInstance();
    }

    @Override
    public Bitmap getBitmap(String url) {
        return bitmapCache.get(url);
    }

    @Override
    public void putBitmap(String url, Bitmap bitmap) {
        bitmapCache.put(url,bitmap);
    }
}
